<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<!-- <script type="text/javascript" src="instrument/init.js"></script>
	<script type="text/javascript" src="instrument/probe_operator.js"></script> -->
	<script type="text/javascript" src="script_operator.js"></script>
	<script type="text/javascript" src="XHR_operator.js"></script>
	<script type="text/javascript">
		
	</script> -->


	<script type="text/javascript" id=a>
<<<<<<< .mine
		document.write('hello Wanchun');
		XO.xhr_hanlder('http://www.google.com/analytics/',  function a(){});
=======
		
		(function curry (fn, scope) {
			console.log('curry');
			var scope = scope || window;
			var args = [];
			for (var i=2, len = arguments.length; i < len; ++i) {
				args.push(arguments[i]);
			};
			return function() {
				fn.apply(scope, args);
			};
		})(function(){console.log('hello')},this)
>>>>>>> .r29
		/*
		Math.random = function(){return 1};
		for (var i = 0; i<5; i++){
			console.log(Math.random());
		}
		/**/
		function txt(){
			console.log('....script.text function run....');
		}
		
		var new_scr = document.createElement('script');
		
		//new_scr.onreadystatechange=function(){console.log('script is ready.');};
		//new_scr.onload=function(){console.log('script is onload.');};
		//_new_scr.src = "script_tester_2.js";	
		//_new_scr.src = "script_tester.js";	
		//console.log('new_scr.src: ' + new_scr.src);
		//new_scr.text = "txt();";//"console.log('...script text loaded...');"
		new_scr.text = "console.log('....script.text run 1....');"	
		new_scr.text = "console.log('....script.text run 2....');"
		console.log('Before appendChild(new_scr).');
		document.getElementsByTagName('head')[0].appendChild(new_scr);
		console.log('After appendChild(new_scr).');
			
	
		//new_scr.src = "script_tester.js";	
		console.log('last statement of same tag----');		


		//document.write = SO.rewrite_func(document.write);
		//document.write('heloo world');
		//var in_code = '<scr' + 'ipt type="text/javascript" src="_js_operator.js"></scr' + 'ipt>';
		//document.write(in_code);
		/*		
		document.write('<scr');		
		document.write('ipt type="text/javascript" src="_js_operator.js"></scr');		
		console.log('otherthing');
		document.write('ipt>');
		var global = "a";
	
		function hello_n(){
			console.log("say hello, eh..n...then do sth.");
		}	
	
		function write_code(){
			//document.write(in_code);
			var scr_obj = document.createElement('script');	
			document.getElementsByTagName('head')[0].appendChild(scr_obj);
			console.log('to add console hello');	
			scr_obj.text = "console.log('hello dom'); 		document.write('<scr');		document.write('ipt type=\"text/javascript\" src=\"_js_operator.js\"></scr');		document.write('otherthing'); document.write('ipt>');";
			console.log(scr_obj.text);			
		}
		//write_code();
		//window.addEventListener('load', XO.rewrite_html, true);	
		*/
	</script>	

	<title>Test Trace User Interaction</title>
</head>
<body name="body" >

<BUTTON ID="oButton" onmouseout="alert(oButtonScript.event)">Flip</BUTTON><BR>

<A HREF="TestRecInteraction.html"  name="link2"><IMG id=iButton SRC="button_in_cart.gif" WIDTH="120" HEIGHT="22" BORDER="0" ALT=""></A><BR>
	<script type="text/javascript">	
		//var this_scr = document.getElementById('a');
		//console.log(this_scr);
		//this_scr.onload=function(){console.log('this script is onload.');};
		//console.log('---another script tag---');
		
		//console.log(iButton.onmouseover);
	</script>
<IMG SRC="javascript:alert('XSS');">

<<<<<<< .mine
<A HREF="TestRecInteraction.html"  name="link2"><IMG SRC="button_in_cart.gif" WIDTH="120" HEIGHT="22" BORDER="0" ALT=""></A><BR>

=======
>>>>>>> .r29
<A href="TestRecInteraction.html" ><B><I>link to TestRecInteraction.html<IMG SRC="button_in_cart.gif" WIDTH="120" HEIGHT="22" BORDER="0" ALT=""></I></B></A><BR>

<FORM ACTION="" METHOD=POST name="theForm">
<div name="div_1">
content: <br>
this is the first line<br>
and second<br>
third<br>
</div>	

<SELECT NAME="ele-sel">
	<option selected="selected" value="">Please Select</option>
	<OPTION VALUE="sel-a" >a</OPTION>
	<OPTION VALUE="sel-b" >b</OPTION>
	<OPTION VALUE="sel-c" >c</OPTION>
	<OPTION VALUE="sel-d" >d</OPTION>
</SELECT>
<<<<<<< .mine
name: <INPUT NAME="realname" onclick='alert("handler as attribute")'><BR>
nick: <INPUT NAME="nickname" >


=======
name: 
<INPUT NAME="realname" onclick='console.log("attribute handler")'>
>>>>>>> .r29
<script type="text/javascript">		
	var _func = function(){console.log('anonymous function')};
	//document.write('<scr' + 'ipt type="text/javascript" src="script_operator.js"></scr' + 'ipt>');
	//document.forms[0].realname.addEventListener('click', function(){console.log('anonymous handler')}, false);	
	//document.forms[0].realname.removeEventListener('click', function(){console.log('anonymous handler')}, false);	
<<<<<<< .mine

	document.forms[0].realname.onclick=_func;
	document.forms[0].nickname.onclick=_func;
	console.log(document.forms[0].nickname.onclick);
	console.log(document.forms[0].realname.onclick);
=======
	
>>>>>>> .r29
	//_func = rewrite(_func);
	//document.theForm.realname.onclick=function(){console.log('property handler')};
	document.theForm.realname.addEventListener('click', _func, false);
	function _func(){console.log('dynamic handler')};
	//document.forms[0].realname.removeEventListener('click', _func, false);
	
	//hello_4 = rewrite(hello_4);
	//document.forms[0].realname.addEventListener('click', hello_4, false);
	/**/
	function hello_4(){
		console.log("hello 4!");
		
	}
	//document.forms[0].realname.addEventListener('click', write_code, false);
	
</script> 
Email:<INPUT NAME="_email">
<script type="text/javascript"> 
	//document.forms[0]._email.addEventListener('click', hello_n, false);
</script> 

destination: <INPUT type= "password" NAME="desination"><br>

<input type="radio" checked="" value="38" name="id[11]"/>
1. Soft Carry Case<br/>



<input type="radio" value="39" name="id[11]"/>
2. Hard Shell Carry Case (+US$2.00)<br/><br/>

<input type="radio" name="group1" value="Milk"> Milk <br>
<input type="radio" name="group1" value="Butter"> Butter <br>
<input type="radio" name="group1" value="Cheese"> Cheese <br>
<input type="checkbox" value="1" id="checkout-ship-same" name="checkout-ship-same"/>

<input type="hidden" value="77" name="products_id"/>
<input type="image" border="0" title=" Add to Cart " alt="Add to Cart" src="button_in_cart.gif"/>

<TEXTAREA NAME="textarea" ROWS="3" COLS="5"></TEXTAREA> <br>

<input type="file" name="aFile"><br>

<IMG SRC="logo.png" WIDTH="250" HEIGHT="61" BORDER="0" ALT="">

<TEXTAREA NAME="" ROWS="5" COLS="15" id=t-area></TEXTAREA> <br>



<INPUT TYPE="reset"><input type="button" VALUE="do nothing" >
</FORM>
<script type="text/javascript">
	//console.log('far from append child');
	//SO.count_script(document);
	//JO.run();
	//document.forms[0].realname.addEventListener('click', hello_n, false);	
	//console.log(SO.iterate_script(document));
</script>

</BODY>



</html>
